props = allProps.stream()
- .filter(s -> s.startsWith(prefix))
- .collect(Collectors.toList());
-
- // If no match, try CamelCase completion..
- if (props.isEmpty()) {
- final Pattern pat = makeCamelCasePattern(prefix);
- if (pat != null) {
- return allProps.stream()
- .filter(s -> pat.matcher(s).matches())
- .collect(Collectors.toList());
- }
- }
-
- return props;
- }
-}
diff -r dd5198db2e5b src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/resources/jjs.js
--- a/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/resources/jjs.js Sat Mar 28 21:07:55 2020 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-(function () {
-
-// Check if java.desktop module is available and we're running in non-headless mode.
-// We access AWT via script to avoid direct dependency on java.desktop module.
-function isHeadless() {
- var GraphicsEnvironment = java.awt.GraphicsEnvironment;
- return Java.isType(GraphicsEnvironment)? GraphicsEnvironment.isHeadless() : true;
-}
-
-
-// Function that shows a JFileChooser dialog and returns the file name chosen (if chosen).
-// We access swing from script to avoid direct dependency on java.desktop module.
-function chooseFile() {
- var JFileChooser = javax.swing.JFileChooser;
- if (!Java.isType(JFileChooser)) {
- return null;
- }
-
- var ExtensionFilter = javax.swing.filechooser.FileNameExtensionFilter;
- function run() {
- var chooser = new JFileChooser();
- chooser.fileFilter = new ExtensionFilter('JavaScript Files', 'js');
- var retVal = chooser.showOpenDialog(null);
- return retVal == JFileChooser.APPROVE_OPTION ?
- chooser.selectedFile.absolutePath : null;
- }
-
- var FutureTask = java.util.concurrent.FutureTask;
- var fileChooserTask = new FutureTask(run);
- javax.swing.SwingUtilities.invokeLater(fileChooserTask);
-
- return fileChooserTask.get();
-}
-
-// Function that opens up the desktop browser application with the given URI.
-// We access AWT from script to avoid direct dependency on java.desktop module.
-function browse(uri) {
- var Desktop = java.awt.Desktop;
- if (Java.isType(Desktop)) {
- Desktop.desktop.browse(uri);
- }
-}
-
-function printDoc(list) {
- list.forEach(function(doc) {
- print();
- print(doc.signature());
- print();
- print(doc.javadoc());
- });
-}
-
-var JShell = null;
-var jshell = null;
-
-function javadoc(obj) {
- var str = String(obj);
- if (!JShell) {
- // first time - resolve JShell class
- JShell = Packages.jdk.jshell.JShell;
- // if JShell class is available, create an instance
- jshell = Java.isType(JShell)? JShell.create() : null;
- }
-
- if (!jshell) {
- // we don't have jshell. Just print the default!
- return print(str);
- }
-
- /*
- * A java method object's String representation looks something like this:
- *
- * For an overloaded method:
- *
- * [jdk.dynalink.beans.OverloadedDynamicMethod
- * String java.lang.System.getProperty(String,String)
- * String java.lang.System.getProperty(String)
- * ]
- *
- * For a non-overloaded method:
- *
- * [jdk.dynalink.beans.SimpleDynamicMethod void java.lang.System.exit(int)]
- *
- * jshell expects "java.lang.System.getProperty(" or "java.lang.System.exit("
- * to retrieve the javadoc comment(s) for the method.
- */
- var javaCode = str.split(" ")[2]; // stuff after second whitespace char
- javaCode = javaCode.substring(0, javaCode.indexOf('(') + 1); // strip argument types
-
- try {
- var analysis = jshell.sourceCodeAnalysis();
- var docList = analysis.documentation(javaCode, javaCode.length, true);
- if (!docList.isEmpty()) {
- return printDoc(docList);
- }
-
- /*
- * May be the method is a Java instance method. In such a case, jshell expects
- * a valid starting portion of an instance method call expression. We cast null
- * to Java object and call method on it. i.e., We pass something like this:
- *
- * "((java.io.PrintStream)null).println("
- */
- var javaType = javaCode.substring(0, javaCode.lastIndexOf('.'));
- javaCode = "((" + javaType + ")null)" + javaCode.substring(javaCode.lastIndexOf('.'));
- docList = analysis.documentation(javaCode, javaCode.length, true);
- if (!docList.isEmpty()) {
- return printDoc(docList);
- }
- } catch (e) {
- }
- print(str);
-}
-
-return {
- isHeadless: isHeadless,
- chooseFile: chooseFile,
- browse: browse,
- javadoc: javadoc
-};
-
-})();
diff -r dd5198db2e5b src/jdk.scripting.nashorn.shell/share/classes/module-info.java
--- a/src/jdk.scripting.nashorn.shell/share/classes/module-info.java Sat Mar 28 21:07:55 2020 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Defines Nashorn shell module.
- *
- * This module includes the command line tool {@index jjs jjs tool}
- * to invoke the Nashorn engine.
- *
- * @toolGuide jjs
- *
- * @moduleGraph
- * @since 9
- */
-@Deprecated(since="11", forRemoval=true)
-module jdk.scripting.nashorn.shell {
- requires static java.compiler;
- requires jdk.internal.le;
- requires jdk.scripting.nashorn;
- requires jdk.internal.ed;
- uses jdk.internal.editor.spi.BuildInEditorProvider;
-}
-
diff -r dd5198db2e5b src/jdk.scripting.nashorn.shell/share/man/jjs.1
--- a/src/jdk.scripting.nashorn.shell/share/man/jjs.1 Sat Mar 28 21:07:55 2020 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\" Automatically generated by Pandoc 2.3.1
-.\"
-.TH "JJS" "1" "2020" "JDK 14" "JDK Commands"
-.hy
-.SH NAME
-.PP
-jjs \- command\-line tool to invoke the Nashorn engine
-.SH SYNOPSIS
-.PP
-\f[B]Note:\f[R] The \f[CB]jjs\f[R] tool and the Nashorn engine are
-deprecated in JDK 11 in preparation for removal in a future release.
-.PP
-\f[CB]jjs\f[R] [\f[I]options\f[R]] \f[I]script\-files\f[R] [\f[CB]\-\-\f[R]
-\f[I]arguments\f[R]]
-.TP
-.B \f[I]options\f[R]
-This represents one or more options of the \f[CB]jjs\f[R] command,
-separated by spaces.
-See \f[B]Options for the jjs Command\f[R].
-.RS
-.RE
-.TP
-.B \f[I]script\-files\f[R]
-This represents one or more script files that you want to interpret
-using the Nashorn engine, separated by spaces.
-If no files are specified, then an interactive shell is started.
-.RS
-.RE
-.TP
-.B \f[I]arguments\f[R]
-All values after the double hyphen marker (\f[CB]\-\-\f[R]) are passed
-through to the script or the interactive shell as arguments.
-These values can be accessed by using the \f[CB]arguments\f[R] property.
-.RS
-.RE
-.SH DESCRIPTION
-.PP
-The \f[CB]jjs\f[R] command\-line tool is used to invoke the Nashorn
-engine.
-You can use it to interpret one or several script files, or to run an
-interactive shell.
-.SH OPTIONS FOR THE JJS COMMAND
-.PP
-The options of the \f[CB]jjs\f[R] command control the conditions under
-which scripts are interpreted by Nashorn engine.
-.TP
-.B \f[CB]\-D\f[R]\f[I]name\f[R]\f[CB]=\f[R]\f[I]value\f[R]
-Sets a system property to be passed to the script by assigning a value
-to a property name.
-The following example shows how to invoke Nashorn engine in interactive
-mode and assign \f[CB]myValue\f[R] to the property named \f[CB]myKey\f[R]:
-.RS
-.IP
-.nf
-\f[CB]
->>\ jjs\ \-DmyKey=myValue
-jjs>\ java.lang.System.getProperty("myKey")
-myValue
-jjs>
-\f[R]
-.fi
-.PP
-This option can be repeated to set multiple properties.
-.RE
-.TP
-.B \f[CB]\-\-add\-modules\f[R] \f[I]modules\f[R]
-Specifies the root user Java modules.
-.RS
-.RE
-.TP
-.B \f[CB]\-cp\f[R] \f[I]path\f[R] or \f[CB]\-classpath\f[R] \f[I]path\f[R]
-Specifies the path to the supporting class files.
-To set multiple paths, the option can be repeated, or you can separate
-each path with the following character:
-.RS
-.IP \[bu] 2
-\f[B]Oracle Solaris, Linux, and OS X:\f[R] Colon (\f[CB]:\f[R])
-.IP \[bu] 2
-\f[B]Windows:\f[R] Semicolon (\f[CB];\f[R])
-.RE
-.TP
-.B \f[CB]\-doe=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]] or \f[CB]\-dump\-on\-error=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]]
-Provides a full stack trace when an error occurs.
-By default, only a brief error message is printed.
-The default parameter is \f[CB]false\f[R].
-.RS
-.RE
-.TP
-.B \f[CB]\-fv=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]] or \f[CB]\-fullversion=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]]
-Prints the full Nashorn version string.
-The default parameter is \f[CB]false\f[R].
-.RS
-.RE
-.TP
-.B \f[CB]\-fx=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]]
-Launches the script as a JavaFX application.
-The default parameter is \f[CB]false\f[R].
-.RS
-.PP
-\f[B]Note:\f[R]
-.PP
-You must explicitly add the JavaFX modules to launch the script as a
-JavaFX application.
-The following example specifies the location of the JavaFX modules and
-adds them with the \f[CB]\-\-module\-path\f[R] and
-\f[CB]\-\-add\-modules\f[R] options:
-.IP
-.nf
-\f[CB]
-jjs\ \-fx\ \-\-module\-path\ /SOMEDIR/javafx\-sdk\-11/lib\ \-\-add\-modules\ javafx.controls\ HelloWorld.js
-\f[R]
-.fi
-.PP
-The following example uses the \f[CB]jlink\f[R] command to create a custom
-runtime image that contains the JavaFX modules.
-The example then launches a script as a JavaFX application without
-specifying the JavaFX modules in the \f[CB]jjs\f[R] command:
-.IP
-.nf
-\f[CB]
-jlink\ \-\-module\-path\ /SOMEDIR/javafx\-jmods\-11\ \-\-add\-modules\ jdk.scripting.nashorn,jdk.scripting.nashorn.shell,javafx.controls\ \-\-output\ /SOMEDIR/myjdk
-
-/SOMEDIR/myjdk/bin/jjs\ \-fx\ HelloWorld.js
-\f[R]
-.fi
-.PP
-If you don\[aq]t explicitly specify the JavaFX modules, then the
-\f[CB]jjs\f[R] command prints a message and exits:
-.IP
-.nf
-\f[CB]
-jjs\ \-fx\ HelloWorld.js
-
-JavaFX\ is\ not\ available.
-\f[R]
-.fi
-.RE
-.TP
-.B \f[CB]\-h\f[R] or \f[CB]\-help\f[R]
-Prints the list of options and their descriptions.
-.RS
-.RE
-.TP
-.B \f[CB]\-\-language=\f[R][\f[CB]es5\f[R]|\f[CB]es6\f[R]]
-Specifies the ECMAScript language version.
-The default version is ES5.
-.RS
-.RE
-.TP
-.B \f[CB]\-\-module\-path\f[R] \f[I]path\f[R]
-Specifies where to find user Java modules.
-.RS
-.RE
-.TP
-.B \f[CB]\-ot=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]] or \f[CB]\-optimistic\-types=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]]
-Enables or disables optimistic type assumptions with deoptimizing
-recompilation.
-This makes the compiler try, for any program symbol whose type can\[aq]t
-be proven at compile time, to type it as narrowly and primitively as
-possible.
-If the runtime encounters an error because the symbol type is too
-narrow, then a wider method is generated until a steady stage is
-reached.
-While this produces as optimal Java bytecode as possible, erroneous type
-guesses will lead to longer warmup.
-Optimistic typing is currently enabled by default, but it can be
-disabled for faster startup performance.
-The default parameter is \f[CB]true\f[R].
-.RS
-.RE
-.TP
-.B \f[CB]\-scripting=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]]
-Enables a shell scripting features.
-The default parameter is \f[CB]true\f[R].
-.RS
-.RE
-.TP
-.B \f[CB]\-strict=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]]
-Enables a strict mode, which enforces stronger adherence to the standard
-(ECMAScript Edition 5.1), making it easier to detect common coding
-errors.
-The default parameter is \f[CB]false\f[R].
-.RS
-.RE
-.TP
-.B \f[CB]\-t=\f[R]\f[I]zone\f[R] or \f[CB]\-timezone=\f[R]\f[I]zone\f[R]
-Sets the specified time zone for script execution.
-It overrides the time zone set in the OS and used by the \f[CB]Date\f[R]
-object.
-The default \f[I]zone\f[R] is \f[CB]America/Los_Angeles\f[R].
-.RS
-.RE
-.TP
-.B \f[CB]\-v=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]] or\f[CB]\-version=\f[R][\f[CB]true\f[R]|\f[CB]false\f[R]]
-Prints the Nashorn version string.
-The default parameter is \f[CB]false\f[R].
-.RS
-.RE
-.SH EXAMPLE OF RUNNING A SCRIPT WITH NASHORN
-.IP
-.nf
-\f[CB]
-jjs\ script.js
-\f[R]
-.fi
-.SH EXAMPLE OF RUNNING NASHORN IN INTERACTIVE MODE
-.IP
-.nf
-\f[CB]
->>\ jjs
-jjs>\ println("Hello,\ World!")
-Hello,\ World!
-jjs>\ quit()
->>
-\f[R]
-.fi
-.SH EXAMPLE OF PASSING ARGUMENTS TO NASHORN
-.IP
-.nf
-\f[CB]
->>\ jjs\ \-\-\ a\ b\ c
-jjs>\ arguments.join(",\ ")
-a,\ b,\ c
-jjs>
-\f[R]
-.fi
diff -r dd5198db2e5b src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/linker/NashornLinkerExporter.java
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/linker/NashornLinkerExporter.java Sat Mar 28 21:07:55 2020 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * - Neither the name of Oracle nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package jdk.nashorn.api.linker;
-
-import java.util.List;
-import jdk.dynalink.linker.GuardingDynamicLinker;
-import jdk.dynalink.linker.GuardingDynamicLinkerExporter;
-import jdk.nashorn.internal.runtime.linker.Bootstrap;
-
-/**
- * This linker exporter is a service provider that exports Nashorn Dynalink
- * linkers to external users. Other language runtimes that use Dynalink
- * can use the linkers exported by this provider to support tight integration
- * of Nashorn objects.
- */
-@Deprecated(since="11", forRemoval=true)
-public final class NashornLinkerExporter extends GuardingDynamicLinkerExporter {
- /**
- * The default constructor.
- */
- public NashornLinkerExporter() {}
-
- /**
- * Returns a list of exported nashorn specific linkers.
- *
- * @return list of exported nashorn specific linkers
- */
- @Override
- public List get() {
- return Bootstrap.getExposedLinkers();
- }
-}
diff -r dd5198db2e5b src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java Sat Mar 28 21:07:55 2020 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.nashorn.api.scripting;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Objects;
-import java.util.Set;
-
-/**
- * This is the base class for nashorn ScriptObjectMirror class.
- *
- * This class can also be subclassed by an arbitrary Java class. Nashorn will
- * treat objects of such classes just like nashorn script objects. Usual nashorn
- * operations like obj[i], obj.foo, obj.func(), delete obj.foo will be delegated
- * to appropriate method call of this class.
- *
- * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
- * are deprecated with the intent to remove them in a future release.
- *
- * @since 1.8u40
- */
-@Deprecated(since="11", forRemoval=true)
-public abstract class AbstractJSObject implements JSObject {
- /**
- * The default constructor.
- */
- public AbstractJSObject() {}
-
- /**
- * @implSpec This implementation always throws UnsupportedOperationException
- */
- @Override
- public Object call(final Object thiz, final Object... args) {
- throw new UnsupportedOperationException("call");
- }
-
- /**
- * @implSpec This implementation always throws UnsupportedOperationException
- */
- @Override
- public Object newObject(final Object... args) {
- throw new UnsupportedOperationException("newObject");
- }
-
- /**
- * @implSpec This imlementation always throws UnsupportedOperationException
- */
- @Override
- public Object eval(final String s) {
- throw new UnsupportedOperationException("eval");
- }
-
- /**
- * @implSpec This implementation always returns null
- */
- @Override
- public Object getMember(final String name) {
- Objects.requireNonNull(name);
- return null;
- }
-
- /**
- * @implSpec This implementation always returns null
- */
- @Override
- public Object getSlot(final int index) {
- return null;
- }
-
- /**
- * @implSpec This implementation always returns false
- */
- @Override
- public boolean hasMember(final String name) {
- Objects.requireNonNull(name);
- return false;
- }
-
- /**
- * @implSpec This implementation always returns false
- */
- @Override
- public boolean hasSlot(final int slot) {
- return false;
- }
-
- /**
- * @implSpec This implementation is a no-op
- */
- @Override
- public void removeMember(final String name) {
- Objects.requireNonNull(name);
- //empty
- }
-
- /**
- * @implSpec This implementation is a no-op
- */
- @Override
- public void setMember(final String name, final Object value) {
- Objects.requireNonNull(name);
- //empty
- }
-
- /**
- * @implSpec This implementation is a no-op
- */
- @Override
- public void setSlot(final int index, final Object value) {
- //empty
- }
-
- // property and value iteration
-
- /**
- * @implSpec This implementation returns empty set
- */
- @Override
- public Set keySet() {
- return Collections.emptySet();
- }
-
- /**
- * @implSpec This implementation returns empty set
- */
- @Override
- public Collection